//
//  BaseView.m
//  HGInitManager
//
//  Created by  ZhuHong on 2017/4/29.
//  Copyright © 2017年 CoderHG. All rights reserved.
//

#import "BaseView.h"

@implementation BaseView

+ (instancetype)hgView {
    return [[self alloc] init];
}

+ (instancetype)xibView {
    NSString* xibName = NSStringFromClass(self);
    
    NSArray* views = [[NSBundle mainBundle] loadNibNamed:xibName owner:nil options:nil];
    for (UIView* view in views) {
        if ([xibName isEqualToString:NSStringFromClass(view.class)]) {
            return (BaseView*)view;
        }
    }

    
    return nil;
}

@end
